package cate.common.table.farm.forbidden.row;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import cate.common.table.rank.row.IRewardRankRow;
import easy.java.dev.note.NoteField;

public class ForbiddenRankRewardRow extends ERow implements IRewardRankRow {

    @NoteField(value= "排名起始")
    public int begin;

    @NoteField(value = "排名结束")
    public int end;

    @NoteField(value = "奖励")
    public String rewardStr;

    public int levelLimit;

    @Override
    public void parse(XSSFRowWrap xr) {
        this.id = xr.getInteger("ID");
        this.begin = xr.getInteger("排名起始", -1);
        this.end = xr.getInteger("排名结束", -1);
        this.rewardStr = xr.getString("奖励");
        this.levelLimit = xr.getInteger("等级", 0);
    }

    @Override
    public int getRewardId() {
        return this.id;
    }

    @Override
    public String getRewardStr() {
        return rewardStr;
    }

    @Override
    public long getRewardValue() {
        return 0;
    }

    @Override
    public int getLevelLimit() {
        return levelLimit;
    }
}
